﻿package Message.BroadCast
{
    import Framework.Serialize.*;

    public class SeqEntityInfoHelper extends Object
    {

        public function SeqEntityInfoHelper()
        {
            return;
        }// end function

        public static function write(param1:SerializeStream, param2:Array) : void
        {
            var _loc_3:int = 0;
            var _loc_4:SEntityInfo = null;
            if (param2 == null)
            {
                param1.writeSize(0);
            }
            else
            {
                param1.writeSize(param2.length);
                _loc_3 = 0;
                while (_loc_3 < param2.length)
                {
                    
                    _loc_4 = param2[_loc_3] as SEntityInfo;
                    _loc_4.__write(param1);
                    _loc_3++;
                }
            }
            return;
        }// end function

        public static function read(param1:SerializeStream) : Array
        {
            var _loc_2:Array = null;
            var _loc_5:SEntityInfo = null;
            var _loc_3:* = param1.readSize();
            param1.startSeq(_loc_3, 103);
            _loc_2 = new Array();
            var _loc_4:int = 0;
            while (_loc_4 < _loc_3)
            {
                
                _loc_5 = new SEntityInfo();
                _loc_5.__read(param1);
                _loc_2[_loc_4] = _loc_5;
                param1.checkSeq();
                param1.endElement();
                _loc_4++;
            }
            param1.endSeq(_loc_3);
            return _loc_2;
        }// end function

    }
}
